package io.renren.service.impl;

import io.renren.entity.DoctorVOEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;



import io.renren.dao.DoctorDao;
import io.renren.entity.DoctorEntity;
import io.renren.service.DoctorService;

import java.util.List;


@Service("doctorService")
public class DoctorServiceImpl extends ServiceImpl<DoctorDao, DoctorEntity> implements DoctorService {
    @Override
    public List<DoctorVOEntity> getDoctorList(){
        List<DoctorVOEntity> list = baseMapper.getDoctorList();
        return list;
    }

    @Override
    public DoctorVOEntity getDoctorById(Integer doctorid){
        DoctorVOEntity entity = baseMapper.getDoctorById(doctorid);
        return entity;
    }

    @Override
    public List<DoctorVOEntity>  getDoctor(){
        List<DoctorVOEntity> list = baseMapper.getDoctor();
        return list;
    }

    @Override
    public DoctorVOEntity getDoctorByUserName(String username){
        DoctorVOEntity entity = baseMapper.getDoctorByUserName(username);
        return entity;
    }

    @Override
    public int modifyDoctorInfo(@Param("id") Integer id){
        baseMapper.modifyDoctorInfo(id);
        return 0;
    }
}
